﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AnalysisSystemLog.Define.Reg
{
    public class SoundRegManager
    {
        /**
         * \brief 创建各设备类的存储字典
         * 
         * \param[in] string 设备类型，对应Reg中的summary
         */
        private Dictionary<string, string> MainRegDic = new Dictionary<string, string>()
        {
                           {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/ChangeTheme/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\桌面主题已更改完毕.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/DeviceFail/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\提示：设备连接失败.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/DeviceDisconnect/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\提示：设备连接已中断.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/DeviceConnect/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\外接设备已连接成功 .wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/WindowsLogon/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\欢迎使用史柯凡智能安全防护系统.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/WindowsLogoff/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\下次见.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/AppGPFault/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\应用程序向您提出权限申请.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/SystemHand/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\警告，软件出现关键性停止.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/LowBatteryAlarm/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\警告，电量仅剩下百分之十，设备大约还可以持续工作十五分钟左右，请确认您附近是否存在可用插销，以便及时充电.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/CriticalBatteryAlarm/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\警告，电量严重不足，请及时充电.wav"},
                                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/MailBeep/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\您有一份新邮件.wav"},
                //            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/Notification.Mail/.Current ]", 
                //System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\您有一份新邮件.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/Notification.Reminder/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\先生，您有一条系统消息.wav"},
                //            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/ChangeTheme/.Current ]", 
                //System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\智能语音识别程序已启动.wav"},
                //            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/ChangeTheme/.Current ]", 
                //System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\语音识别已关闭.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/SystemQuestion/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\警告.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/SnapShot]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\全屏截图已完毕.wav"}
        };

        /**
           * \brief 创建各设备类的存储字典
           * 
           * \param[in] string 设备类型，对应Reg中的summary
           */
        private Dictionary<string, string> RetSetRegDic = new Dictionary<string, string>()
        {
                           {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/ChangeTheme/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\桌面主题已更改完毕.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/DeviceFail/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\提示：设备连接失败.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/DeviceDisconnect/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\提示：设备连接已中断.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/DeviceConnect/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\外接设备已连接成功 .wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/WindowsLogon/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\欢迎使用史柯凡智能安全防护系统.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/WindowsLogoff/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\下次见.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/AppGPFault/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\应用程序向您提出权限申请.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/SystemHand/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\警告，软件出现关键性停止.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/LowBatteryAlarm/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\警告，电量仅剩下百分之十，设备大约还可以持续工作十五分钟左右，请确认您附近是否存在可用插销，以便及时充电.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/CriticalBatteryAlarm/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\警告，电量严重不足，请及时充电.wav"},
                                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/MailBeep/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\您有一份新邮件.wav"},
                //            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/Notification.Mail/.Current ]", 
                //System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\您有一份新邮件.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/Notification.Reminder/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\先生，您有一条系统消息.wav"},
                //            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/ChangeTheme/.Current ]", 
                //System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\智能语音识别程序已启动.wav"},
                //            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/ChangeTheme/.Current ]", 
                //System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\语音识别已关闭.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/SystemQuestion/.Current ]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\警告.wav"},
                            {"[HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/SnapShot]", 
                System.AppDomain.CurrentDomain.BaseDirectory + @"Lily\全屏截图已完毕.wav"}
        };

        /** 注册表信息列表 **/
        public List<RegData> regList = new List<RegData>();

        /** 注册表数据解析 **/
        public void SetRegData()
        {
            regList.Clear();
            foreach (var v in MainRegDic)
            {
                // 进行相关注册工作
                RegData reg = new RegData(v.Key);
                regList.Add(reg);
            }
        }
    }
}
